export default {
  namespace: 'busiObjManage',
  state: {
    busiObjAddVisibleFlag: false,
    busiObjAddType: 'add', // add, modify
    attrSpecAddVisibleFlag: false,
    attrSpecAddType: 'add', // add, modify
    attrValueAddVisibleFlag: false,
    attrValueAddType: 'add', // add, modify
    selectBusiObj: {}, // 选中的业务对象
    selectAttrSpec: {}, // 选中的属性规格
    selectAttrValue: {}, // 选中的属性值
    selectParentBusiObjFlag: false, // 选中的父业务对象

  },

  effects: {},

  reducers: {

    saveBusiObjAddVisibleFlag(state, { payload: params }) {
      return {
        ...state,
        busiObjAddVisibleFlag: params,
      };
    },

    saveBusiObjAddType(state, { payload: params }) {
      return {
        ...state,
        busiObjAddType: params,
      };
    },

    saveAttrSpecAddVisibleFlag(state, { payload: params }) {
      return {
        ...state,
        attrSpecAddVisibleFlag: params,
      };
    },

    saveAttrSpecAddType(state, { payload: params }) {
      return {
        ...state,
        attrSpecAddType: params,
      };
    },

    saveAttrValueAddVisibleFlag(state, { payload: params }) {
      return {
        ...state,
        attrValueAddVisibleFlag: params,
      };
    },

    saveAttrValueAddType(state, { payload: params }) {
      return {
        ...state,
        attrValueAddType: params,
      };
    },

    saveSelectBusiObj(state, { payload: params }) {
      return {
        ...state,
        selectBusiObj: params,
      };
    },

    saveSelectAttrSpec(state, { payload: params }) {
      return {
        ...state,
        selectAttrSpec: params,
      };
    },

    saveSelectAttrValue(state, { payload: params }) {
      return {
        ...state,
        selectAttrValue: params,
      };
    },

    saveSelectParentBusiObjFlag(state, { payload: params }) {
      return {
        ...state,
        selectParentBusiObjFlag: params,
      };
    },

  },
};
